#ifndef HEADER_H
#define HEADER_H

#include <QString>
#include <QMutex>
#include <QMutexLocker>

// 宏定义
#define WIDTHRATIO                      0.325 // 界面左右界面宽度比例
#define CHANNELCOUNT                    8   // 总的通道数
#define MAXDATASIZE                     1024
#define CMD_RESPONES_HEADER_LENGTH      6
#define BYTESUM                         (4 * 8 * 32 * 1000) // 1s钟的总字节数
#define BYTE256                         (4 * 8 * 256 * 1000)

enum EM9108_CMD_ID{
    CMD_SET_AD_RANGE_E=0,
    CMD_SET_EN_AD_CH_E,
    CMD_SET_AD_INPUT_TYPE_E,
    CMD_SET_SAMPLE_RATE_E,
    CMD_SET_GROUP_CNT_E,
    CMD_SET_AD_START_STOP_E,
    CMD_SET_AUTO_SEND_START_E,
    CMD_SET_IO_IN_FIFO_E,
    CMD_SET_CT_IN_FIFO_E,
    CMD_SET_EC_IN_FIFO_E
};

typedef struct _em9108_cmd{
    int addr;
    int fun; //0x10 write, 0x03 read
    int len; //寄存器数量
}em9108_cmd;

typedef struct DateTimeInfo {
    QString Year;
    QString Month;
    QString Day;
    QString Hour;
    QString Minute;
    QString Second;
    QString YearMonth; // 2018-05
    QString Date;      // 2018-05-15
    QString DateTime;  // 2018-05-15_13-13-13
}DateTimeInfo;



#endif // HEADER_H
